/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package exercicio14;

/**
 *
 * @author Caio
 */
public class CustomersBase {
    private DataObject _dataObject;
    protected String group;

    public DataObject getDataObject() {
        return _dataObject;
    }

    public void setDataObject(DataObject _dataObject) {
        this._dataObject = _dataObject;
    }
    
 
    public CustomersBase(String group)
    {
      this.group = group;
    }
 
    // Property
   
    public  void Next()
    {
      _dataObject.NextRecord();
    }
 
    public  void Prior()
    {
      _dataObject.PriorRecord();
    }
 
    public  void Add(String customer)
    {
      _dataObject.AddRecord(customer);
    }
 
    public  void Delete(String customer)
    {
      _dataObject.DeleteRecord(customer);
    }
 
    public  void Show()
    {
      _dataObject.ShowRecord();
    }
 
    public  void ShowAll()
    {
      System.out.println("Customer Group: " + group);
      _dataObject.ShowAllRecords();
    }
}
